package com.bingxue.edu.management.education.model.entity;

import com.bingxue.edu.common.enums.LessonStatusEnum;
import com.bingxue.edu.framework.common.model.BusinessEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.bingxue.edu.common.constant.DateConstants.FORMAT_TIME_HHmm;

/**
 * 班级课次
 *
 * @author zq
 * @since 2024/08/24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table("edu_lesson")
public class Lesson extends BusinessEntity {

    @Schema(description = "班级id")
    private String classId;

    @Schema(description = "校区")
    private String campusId;

    @Schema(description = "教室")
    private String classroomId;

    @Schema(description = "主讲老师")
    private String leadTeacherId;

    @Schema(description = "辅导老师")
    private String assistTeacherId;

    @Schema(description = "课次顺序")
    private Integer lessonIndex;

    @Schema(description = "课次标题")
    private String title;

    @Schema(description = "上课日期")
    private LocalDate lessonDate;

    @Schema(description = "开始时间")
    @JsonFormat(pattern = FORMAT_TIME_HHmm)
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @JsonFormat(pattern = FORMAT_TIME_HHmm)
    private LocalDateTime endTime;

    @Schema(description = "课次状态")
    private LessonStatusEnum lessonStatus;

    @Schema(description = "课次模板id")
    private String arrangeLessonId;

    @Schema(description = "课次描述")
    private String description;

    @Schema(description = "备注（内部）")
    private String remark;
}
